home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SYS
/
KEYCHANGE
/
!KeyChange
/
Manual
< prev
next >
Wrap
Text File
|
1992-06-14
|
12KB
|
205 lines
Manual for the KeyChange module.
================================
The KeyChange module allows the numeric keypad keys to be used as function
keys, and provides a way of generating extra codes from the function keys
for use with "hot-key" utilities. This file describes the facilities
provided in detail. Note that either or both of the "extended keypad" and
"extended function keys" features can be disabled; see the !Help file for
details.
The description given here is rather complex, as there is a fairly large
number of options. The default settings make the keypad keys act as function
keys, which is fairly simple; use for hot-keys either requires a reasonable
understanding of key codes, or an application which lets you set the keys
used just by typing them (but I don't know of any which do this).
The Numeric Keypad.
-------------------
This has duplicates of the numbers and a few other characters, which makes
entering lists of numbers faster, but is probably not used by most people
for much of the time. If you press the Num Lock key the light goes out, and
you can use some of the keys as duplicate cursor keys, but I doubt that many
people ever use this (or even know about it). The KeyChange module allows
you to use the keypad keys as substitutes for the function keys, and also as
"extended" function keys (described below). When this feature is enabled,
the keys act as follows; the diagram on the left shows the "function key"
mapping, and the one on the right shows those keys which map onto "extended
keys" (keys marked "--" have no equivalent).
+------+------+------+------+ +------+------+------+------+
| | | | | | | | | |
| N.L. | F10 | F11 | F12 | | N.L. | Tab | Copy | ⇦ |
| | | | | | | | | |
+------+------+------+------+ +------+------+------+------+
| | | | | | | | | |
| F7 | F8 | F9 | F13 | | -- | -- | -- | ⇨ |
| | | | | | | | | |
+------+------+------+------+ +------+------+------+------+
| | | | | | | | | |
| F4 | F5 | F6 | F14 | | -- | -- | -- | ⇩ |
| | | | | | | | | |
+------+------+------+------+ +------+------+------+------+
| | | | | | | | | |
| F1 | F2 | F3 | E | | -- | -- | -- | E |
| | | | n | | | | | n |
+------+------+------+ t | +------+------+------+ t |
| | | e | | | | e |
| F0 | F15 | r | | -- | ⇧ | r |
| | | | | | | |
+-------------+------+------+ +-------------+------+------+
The Enter key is unaltered, but the other keys behave exactly like the
function keys. This includes the generation of extended function key codes,
described below. Note that the Print and Insert keys are "really" F0 and
F13. F14 and F15 don't exist on the standard keyboard; this makes them
the most obvious candidates for "hot keys", as normal applications won't
use them. See the table at the end of this file for the codes to which they
correspond.
Keypad modes.
-------------
If the extended keypad is enabled, the keypad can be in one of four modes:
1) Normal - gives the symbols printed on the keys.
2) Num Lock off - this is the state that gives cursor keys etc.
3) Function keys - as shown above.
4) Extended function keys - as above, but with F0 to F9 acting as
extended keys (i.e. swapped between the two tables).
The last mode means that you "normally" get the extended keys, but you can
also get the standard function keys by using them with Alt or right-Ctrl as
described below. This makes them more awkward to use as function keys, but
better for hot-key use. Only F0 to F9 are swapped because the other
"extended" keys already exist on the keyboard, whereas F14 and F15 do not.
The modes can be selected as follows:
1) Pressing Num Lock in modes 3 or 4 changes to mode 1; the LED stays lit.
2) Pressing Num Lock in modes 1 changes to whichever of modes 3 or 4
was previously used, and in mode 2 to whichever of modes 1, 3 or 4 was
previously used; the LED stays lit.
2) Pressing Ctrl-Num Lock (either Ctrl key) in any mode except 2 changes
to mode 2; the LED goes out. In mode 2 Ctrl is ignored.
3) Pressing Shift-Num Lock in any mode swaps between modes 3 and 4, and
changes to whichever of them is then selected; the LED stays lit.
A beep is generated whenever the mode changes. This may seem complicated,
but in practice you're only likely to use mode 1 and one of modes 3 or 4,
and you just swap between these by pressing Num Lock. See the !Help file for
how to choose which mode is selected initially, or to change it with a *
command. The default is mode 3.
Extended function key codes.
----------------------------
There are various so-called hot-key utilities in the public domain, which
allow applications to be launched and other effects triggered by pressing
function keys or control keys. Unfortunately, if you're using a major
application it often intercepts most of these keys, which stops the hot-keys
from working. For example, I'm typing this using DeskEdit, which defines all
but six of the function-key combinations (excluding F12, which is reserved
for RISC OS), as well as most of the control codes. The Wimp system has room
for more codes, but you can't normally type them; this is what KeyChange
does for you.
The simplest way to explain the way things work is that there are
potentially 16 basic function keys, numbered 0 to 15. Everyone knows about
the 12 keys along the top row; there are also Print, which is really F0, and
Insert which is really F13. However, F14 and F15 don't exist. Each of these
keys can be used on its own, with Shift, with Ctrl, and with Shift-Ctrl,
giving 64 potential combinations, of which you can normally type 52.
In addition, there are (again potentially) 16 "extended" function keys,
each of which can again be used with Ctrl and Shift to give another 64
codes. Outside the desktop none of these can be typed with the default
setup, but under the Wimp the Tab key acts as the extended F10, Copy as the
extended F11 and the four cursor keys as the extended F12 to F15. The other
10 keys (40 combinations) are unavailable.
KeyChange allows you to get the extended F0 to F9 by pressing either one
of the Alt keys, or the right-hand Ctrl key, with the normal F0 to F9. The
reason for these two options is that, as you may know, the Alt keys can
normally be used with various other keys to generate so-called "top-bit-set"
characters; things like currency symbols, greek letters and accented
characters, and also a "hard space". If you want to use this facility you
can't also use the Alt keys to get extended function keys, in which case you
can use the right-hand Ctrl instead. If you don't use the Alt keys like this
you can type "*Unplug InternationalKeyboard" at the command line, and they
will then be available for use with KeyChange; in this case you can continue
to have the two Ctrl keys behaving identically. Note that you should only
have to do this once; the system remembers when a module is *Unplugged
(although some programs may reinstate it).
There is in fact a slight difference (apart from ease of use) between the
two options. The right-hand Ctrl key only modifies F0 to F9, and behaves as
usual with every other key. However, the Alt key also "shifts" the keys F10
to F12, Insert, Tab, Copy and the cursor keys (see the table below). If you
use the keypad to duplicate function keys (as described above), then this
does NOT apply, i.e. the right-hand ctrl modifies all 16 keypad keys just
like Alt.
Using the extended codes.
-------------------------
In order to make use of the extended codes, you need a hot-key utility which
allows you to define the keys you want to use without making assumptions
about which ones are available. The ideal way of doing this would be to
"teach" it the key you want by pressing it, but I don't personally know of
anything that actually works this way. However, many such applications will
let you specify the keys using key codes (in some cases only by modifying
the program itself). The following table shows the extra codes and which
keys generate them; the codes are given in decimal, with hexadecimal values
in brackets (looking at the hexadecimal codes makes it clearer what's going
on). If you have a copy of the Programmers' Reference Manual, compare this
with the table on page 1198.
Key Extended key code Equivalent key Alt only
Print 448 (&1C0) - No
F1 449 (&1C1) - No
F2 450 (&1C2) - No
F3 451 (&1C3) - No
F4 452 (&1C4) - No
F5 453 (&1C5) - No
F6 454 (&1C6) - No
F7 455 (&1C7) - No
F8 456 (&1C8) - No
F9 457 (&1C9) - No
F10 394 (&18A) Tab Yes
F11 395 (&18B) Copy Yes
F12 396 (&18C) Cursor left Yes
Insert 397 (&18D) Cursor right Yes
Tab 458 (&1CA) F10 Yes
Copy 459 (&1CB) F11 Yes
Cursor left 460 (&1CC) F12 Yes
Cursor right 461 (&1CD) Insert Yes
Cursor down 462 (&1CE) Yes
Cursor up 463 (&1CF) Yes
Pressing Shift with one of these keys adds 16 (&10) to the code; pressing
Ctrl adds 32 (&20) and pressing Shift and Ctrl adds 48 (&30). [If you're
using the right-hand Ctrl to get the extended codes in the first place, you
need to use the left-hand Ctrl as well to get these.] The "equivalent key"
column shows that some of the "extra" codes you get just duplicate keys that
already exist. The last column shows which codes can only be obtained with
the Alt keys; as you can see, most of these are duplicates anyway. Using the
keypad keys as function keys you can get all 64 "normal" codes and all 64
"extra" codes, using either Alt or right-Ctrl, although you do have to press
four keys together to get 16 of them! You should also note that the Page Up
and Page down keys are identical to Shift plus the cursor up/down keys, and
vice versa.
Outside the Wimp environment the codes you get are 256 (&100) less than
the ones in the table above. To make use of them you need to use OS_Bytes
221 to 228, described on p. 519-521 of the PRM, but not in the User Guide
(although I think they were in the BBC micro user guide!). They are briefly
mentioned in the original (pre RISC OS) manual, and may be in the new Basic
manual (which I don't have).